package com.fz.study.project.controller;


import com.fz.study.project.entity.Result;
import com.fz.study.project.service.impl.StockServiceImpl;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-02-21
 */
@Tag(name = "分布式锁测试")
@RestController
@RequiredArgsConstructor
@RequestMapping("/stock")
public class StockController {

    private final StockServiceImpl service;
    @Operation(summary = "锁测试")
    @GetMapping()
    public Result deduct(){
        service.deduct4();
        return Result.success("成功！");
    }

}
